package com.huashizhaoxi.lionapp.service.Impl;

import com.huashizhaoxi.lionapp.dao.FruitOrderMapper;
import com.huashizhaoxi.lionapp.entity.FruitOrderChild;
import com.huashizhaoxi.lionapp.entity.FruitOrderMain;
import com.huashizhaoxi.lionapp.entity.complexType.FruitOrderComplexType;
import com.huashizhaoxi.lionapp.entity.requestType.FruitOrderRequestType;
import com.huashizhaoxi.lionapp.service.FruitOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FruitOrderServiceImpl implements FruitOrderService {

    @Autowired
    FruitOrderMapper fruitOrderMapper;

    @Override
    public void addFruitMainOrder(FruitOrderMain fruitOrderMain) {
        fruitOrderMapper.addFruitMainOrder(fruitOrderMain);
    }

    @Override
    public int addFruitChildOrder(List<FruitOrderChild> fruitOrderChild) {
        return fruitOrderMapper.addFruitChildOrder(fruitOrderChild);
    }

    @Override
    public List<FruitOrderMain> getValidFruitOrder() {
        return fruitOrderMapper.getValidFruitOrder();
    }

    @Override
    public List<FruitOrderChild> getFruitOrderChildList(int id) {
        return fruitOrderMapper.getFruitOrderChildList(id);
    }

    @Override
    public List<FruitOrderComplexType> getFruitOrderComplexTypeList(int id) {
        return fruitOrderMapper.getFruitOrderComplexTypeList(id);
    }
}
